:******************************************************************************
:* eCare
:******************************************************************************
:* Parse Connection Parms
:******************************************************************************
:* Developer: Cash Foley (cash.foley@ps.net)
:* Copyright (C) 2003, Perot Systems Corporation. All rights reserved.
:******************************************************************************

IF "%1" == "" GOTO ERRORPARAMS
IF "%2" == "" GOTO ERRORPARAMS

SET ServerName=%1
set TargetDB=%2

IF "%3" == "" GOTO TRUSTEDCONNNECTION
IF "%4" == "" GOTO ERRORPARAMS

SET UserName=%3
SET UserPassword=%4

set TargetServerSQL=%ServerName% -U%UserName% -P%UserPassword%

GOTO START

:TRUSTEDCONNNECTION
set TargetServerSQL=%ServerName% -E

:START
SET ConnectionString=-S %TargetServerSQL% -d %TargetDB%

EXIT /b 0

:ERRORPARAMS
EXIT /b -1
